package com.ciaojian.core.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.ciaojian.core.enums.business.MemberDetailJumpModeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Atlakyn
 * @since 2021-04-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("d_member_detail")
public class MemberDetail extends Model<MemberDetail> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("名字")
    private String name;

    @ApiModelProperty("标题")
    private String title;

    @ApiModelProperty("小标题")
    private String titleSmall;

    @ApiModelProperty("详细内容(富文本)")
    private String content;

    @ApiModelProperty("是否能单独购买 0不能单独购买(只有会员能购买) 1能单独购买(所有人都能买)")
    private Boolean onlyBuy;

    @ApiModelProperty("套餐组合id")
    private int combine_id;

    /**
     * 选择券或券包 0券 1券包
     */
    @ApiModelProperty(hidden = true)
    private Boolean coupon;

    /**
     * 券ID 或券包ID
     */
    @ApiModelProperty(hidden = true)
    private Integer couponId;

    @ApiModelProperty("会员购买价格(分)")
    private Integer priceMember;

    @ApiModelProperty("普通购买价格(分)")
    private Integer priceNormal;

    @ApiModelProperty("小图")
    private String imageSmall;

    @ApiModelProperty("大图")
    private String imageBig;

    @ApiModelProperty("大图2")
    private String imageBig2;

    @ApiModelProperty("0:没有跳转 1:跳转微信推文 2:跳转tapbar页面 3：打开新的页面")
    private MemberDetailJumpModeEnum jumpMode;

    @ApiModelProperty("显示页面地址")
    private String url;

    @ApiModelProperty(value = "排列顺序 从左到右升序", hidden = true)
    private Integer orderBy;

    @ApiModelProperty("会员可见 0全部可见 1会员可见 2非会员可见")
    private Integer member;

    @ApiModelProperty("会员卡ID")
    private Integer memberId;

    @ApiModelProperty(value = "0显示 1隐藏", hidden = true)
    private Boolean hidden;

    @ApiModelProperty(hidden = true)
    private Date createTime;

    @ApiModelProperty(hidden = true)
    private Date updateTime;



    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
